﻿#region Legal notice
/*
 * This file is part of EPPLib.
 * Copyright 2010, 2011 
 * Gianluca Esposito (info@gianlucaesposito.it)
 * ----------------------------------------------------------------------------
 * EPPLib is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * EPPLib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Nome-Programma; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
#endregion

#region Using directives
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Xml.Serialization;
using System.Text;
using System.Xml;
using System.Xml.Schema;
#endregion

namespace EPPLib.Objects
{
    [Serializable]
    [XmlRoot(ElementName = "infData", Namespace = "urn:ietf:params:xml:ns:contact-1.0")]
   
    public  class InfoContactObject : BaseObject
    {
        #region Members
        private string _id;
        private string _nicID;
        private string _currentRegistrar;
        private string _createRegistrar;
        private string _updateRegistrar;
        private List<ContactStatusObject> _status;
        private DateTime? _createDate;
        private DateTime? _updateDate;
        #endregion

        #region Properties
        [XmlNamespaceDeclarations]
        public XmlSerializerNamespaces xmlns;
        
        [XmlElement(ElementName = "id")]
        public string ID { get { return _id; } set { _id = value; } }

        [XmlElement(ElementName = "status")]
        public List<ContactStatusObject> Status { get { return _status; } set { _status = value; } }

        [XmlElement(ElementName = "roid")]
        public string NicID { get { return _nicID; } set { _nicID = value; } }
        [XmlElement(ElementName = "clID")]
        public string CurrentRegistrar { get { return _currentRegistrar; } set { _currentRegistrar = value; } }
        [XmlElement(ElementName = "crID")]
        public string CreateRegistrar { get { return _createRegistrar; } set { _createRegistrar = value; } }
        [XmlElement(ElementName = "upID")]
        public string UpdateRegistrar { get { return _updateRegistrar; } set { _updateRegistrar = value; } }
        [XmlElement(ElementName = "crDate")]
        public DateTime? CreateDate { get { return _createDate; } set { _createDate = value; } }
        [XmlElement(ElementName = "upDate")]
        public DateTime? UpdateDate { get { return _updateDate; } set { _updateDate = value; } }
       
        [XmlAttribute("schemaLocation", Namespace = XmlSchema.InstanceNamespace)]
        public string xsiSchemaLocation = "urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd";
        #endregion

        #region Constructor(s)
        public InfoContactObject()
        {
            xmlns = new XmlSerializerNamespaces();
            xmlns.Add("contact", "urn:ietf:params:xml:ns:contact-1.0");

            _id = string.Empty;
            _nicID = string.Empty;
            _currentRegistrar = string.Empty;
            _createRegistrar = string.Empty;
            _updateRegistrar = string.Empty;
            _createDate = null;
            _updateDate = null;
            _status = new List<ContactStatusObject>();
        }
        #endregion
    }
}
